import Vue from '/js/vue'
import productList from '/templates/productList'
import addProduct from '/templates/addProduct'
import templateManger from '/templates/templateManger'
import brandManger from '/templates/brandManger'
import userList from '/js/userList'
import Router from '/js/vue-router'

Vue.use(Router)

const router = new Router({
    mode: "history",
    routes: [{
        path: '/',
        name: 'productList',
        component: productList,
        redirect: {name: "productList"},
        children:
            [{
                path: "/",
                name: "productList",
                component: productList,
                meta: {
                    title: "productList"
                }
            },
                {
                    path: "addProduct",
                    name: "addProduct",
                    component: addProduct,
                    meta: {
                        title: "addProduct"
                    }
                },
                {
                    path: "templateManger",
                    name: "templateManger",
                    component: templateManger,
                    meta: {
                        title: "templateManger"
                    }
                }, {
                path: "brandManger",
                name: "brandManger",
                component: brandManger,
                meta: {
                    title: "brandManger"
                }
            }, {
                path: "userList",
                name: "userList",
                component: userList,
                meta: {
                    title: "userList"
                }
            }]
    }]
})

export default router